#include<iostream>
using namespace std;
#include<cmath>
#include<fstream>

int main(){

	int i, j, donator, chosen, popu = 100, round = 1000000000;
	double *money = new double [popu];
	for(i=0;i<popu;i++){
		money[i] = 100;
	}
	for(i=0;i<round;i++){
		donator = rand() % popu;
		money[ donator ] -= 1;
		chosen = rand() % popu;
		money[chosen] += 1;
	}
	ofstream fp("wealth.txt");
	for(i=0;i<popu;i++)
		fp<<money[i]<<"\n";
	fp<<endl;
	return 0;
}
